/******************************************************************************************************
Copyright (C) 2012 Mestrelab Research S.L. All rights reserved.

This file is part of the MNova scripting toolkit.

Authorized users of MNova Software may use this file freely, but this file is provided AS IS
with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE.
*****************************************************************************************************/

/*jslint plusplus: true, indent: 4*/

/** Defines a base class to implement converters that can be added to the Save As... dialog in the GUI
 * this.exportFileFilter is the string that will appear in the dialog, e.g. "My Txt File (*.txt)"
 */
function BaseConverter() {
	"use strict";
	this.exportFileFilter = undefined;
}

/** Must return true when the converter can export the aPageItems array
 */
BaseConverter.prototype.wantsExport = function (aPageItems) {
	"use strict";
	return false;
};

/** Must return zero if the export is succesful.
 * aPageItems: an array with the page items to be exported
 * aFilename: a filename
 */
BaseConverter.prototype.exportItems = function (aPageItems, aFilename) {
	"use strict";
	return 1;
};

BaseConverter.prototype.toString = function () {
	"use strict";
	return this.exportFileFilter;
};
